import React, {Component} from 'react'
import TwoCount from './prop'

class LeftCircle extends Component {
  state = {
    name: 'left',
    number: 0
  }
  clickTime = () => {
    this.setState(pre => ({
      number: ++pre.number
    }))
  }

  render() {
    return (
      <p>
        Time is {this.state.number}
        <button onClick={this.clickTime}>
          计数
        </button>
        <TwoCount number={this.state.number}/>
      </p>
    )
  }
}
export default LeftCircle
